package com.leon.android.component.workmanager_test.task

import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters

/**
 * @time:2019/12/17 15:37
 * @author:Leon
 * @description:
 */
class PeriodicUploadWorker(context: Context, workerParams: WorkerParameters) : Worker(
    context,
    workerParams
) {

    override fun doWork(): Result {
        applicationContext.getExternalFilesDir("")?.writeText("$runAttemptCount\n")
        return Result.success()
    }
}